using System;
using System.Collections;
using System.Collections.Generic;


namespace NanoERP.Model
{
	/// <summary>
    /// 单据编号规则配置
	/// </summary>
	[Serializable]
	public sealed class Billtypeinfo 
	{
		#region Private Members
		
		// Variabili di stato
		private bool _isChanged;

		// Primary Key(s) 
		private int _id; 
		
		// Properties 
		private string _billname; 
		private string _billcname; 
		private int? _kind; 
		private int? _parentid; 
		private int? _billtype; 
		private string _classname; 
		private string _codepre; 
		private string _codesep1; 
		private string _codedate; 
		private string _codesep2; 
		private string _codesno; 
		private string _codesample; 
		private int? _maxbillno; 
		private DateTime? _maxdate; 		

		#endregion
		
		#region Default ( Empty ) Class Constructor
		
		/// <summary>
		/// default constructor
		/// </summary>
		public Billtypeinfo()
		{
			_id = 0; 
			_billname = null; 
			_billcname = null;  
			_kind = 1; 
			_parentid = 0; 
			_billtype = 1;
			_classname = null; 
			_codepre = null; 
			_codesep1 = null; 
			_codedate = null; 
			_codesep2 = null; 
			_codesno = null; 
			_codesample = null;  
			_maxbillno = 0; 
			_maxdate = null;
		}
		
		#endregion // End of Default ( Empty ) Class Constructor
		
		#region Full Constructor
		
		/// <summary>
		/// full constructor
		/// </summary>
		public Billtypeinfo(int id, string billname, string billcname, int? kind, int? parentid, int? billtype, string classname, string codepre, string codesep1, string codedate, string codesep2, string codesno, string codesample, int? maxbillno, DateTime? maxdate)
		{
			_id = id; 
			_billname = billname; 
			_billcname = billcname; 
			_kind = kind; 
			_parentid = parentid; 
			_billtype = billtype; 
			_classname = classname; 
			_codepre = codepre; 
			_codesep1 = codesep1; 
			_codedate = codedate; 
			_codesep2 = codesep2; 
			_codesno = codesno; 
			_codesample = codesample; 
			_maxbillno = maxbillno; 
			_maxdate = maxdate; 
		}
		
		#endregion // End Full Constructor

		#region Public Properties
			
		/// <summary>
		/// 主键
		/// </summary>		
		public int Id
		{
			get { return _id; }
			set { _isChanged |= (_id != value); _id = value; }
		} 
	  
		/// <summary>
		/// 单据名称
		/// </summary>		
		public string Billname
		{
			get { return _billname; }
			set	
			{
				if ( value != null )
					if( value.Length > 100)
						throw new ArgumentOutOfRangeException("Invalid value for Billname", value, value.ToString());
				
				_isChanged |= (_billname != value); _billname = value;
			}
		} 
	  
		/// <summary>
		/// 单据中文名称
		/// </summary>		
		public string Billcname
		{
			get { return _billcname; }
			set	
			{
				if ( value != null )
					if( value.Length > 200)
						throw new ArgumentOutOfRangeException("Invalid value for Billcname", value, value.ToString());
				
				_isChanged |= (_billcname != value); _billcname = value;
			}
		} 
	  
		/// <summary>
		/// 性质
		/// </summary>		
		public int? Kind
		{
			get { return _kind; }
			set { _isChanged |= (_kind != value); _kind = value; }
		} 
	  
		/// <summary>
		/// 父项ID
		/// </summary>		
		public int? Parentid
		{
			get { return _parentid; }
			set { _isChanged |= (_parentid != value); _parentid = value; }
		} 
	  
		/// <summary>
		/// 单据类型
		/// </summary>		
		public int? Billtype
		{
			get { return _billtype; }
			set { _isChanged |= (_billtype != value); _billtype = value; }
		} 
	  
		/// <summary>
		/// 类名
		/// </summary>		
		public string Classname
		{
			get { return _classname; }
			set	
			{
				if ( value != null )
					if( value.Length > 100)
						throw new ArgumentOutOfRangeException("Invalid value for Classname", value, value.ToString());
				
				_isChanged |= (_classname != value); _classname = value;
			}
		} 
	  
		/// <summary>
		/// 拼音码
		/// </summary>		
		public string Codepre
		{
			get { return _codepre; }
			set	
			{
				if ( value != null )
					if( value.Length > 20)
						throw new ArgumentOutOfRangeException("Invalid value for Codepre", value, value.ToString());
				
				_isChanged |= (_codepre != value); _codepre = value;
			}
		} 
	  
		/// <summary>
		/// 分隔符1
		/// </summary>		
		public string Codesep1
		{
			get { return _codesep1; }
			set	
			{
				if ( value != null )
					if( value.Length > 20)
						throw new ArgumentOutOfRangeException("Invalid value for Codesep1", value, value.ToString());
				
				_isChanged |= (_codesep1 != value); _codesep1 = value;
			}
		} 
	  
		/// <summary>
		/// 日期格式
		/// </summary>		
		public string Codedate
		{
			get { return _codedate; }
			set	
			{
				if ( value != null )
					if( value.Length > 50)
						throw new ArgumentOutOfRangeException("Invalid value for Codedate", value, value.ToString());
				
				_isChanged |= (_codedate != value); _codedate = value;
			}
		} 
	  
		/// <summary>
		/// 分隔符2
		/// </summary>		
		public string Codesep2
		{
			get { return _codesep2; }
			set	
			{
				if ( value != null )
					if( value.Length > 20)
						throw new ArgumentOutOfRangeException("Invalid value for Codesep2", value, value.ToString());
				
				_isChanged |= (_codesep2 != value); _codesep2 = value;
			}
		} 
	  
		/// <summary>
		/// 编号
		/// </summary>		
		public string Codesno
		{
			get { return _codesno; }
			set	
			{
				if ( value != null )
					if( value.Length > 20)
						throw new ArgumentOutOfRangeException("Invalid value for Codesno", value, value.ToString());
				
				_isChanged |= (_codesno != value); _codesno = value;
			}
		} 
	  
		/// <summary>
		///  格式样例
		/// </summary>		
		public string Codesample
		{
			get { return _codesample; }
			set	
			{
				if ( value != null )
					if( value.Length > 200)
						throw new ArgumentOutOfRangeException("Invalid value for Codesample", value, value.ToString());
				
				_isChanged |= (_codesample != value); _codesample = value;
			}
		} 
	  
		/// <summary>
		/// 最大编号
		/// </summary>		
		public int? Maxbillno
		{
			get { return _maxbillno; }
			set { _isChanged |= (_maxbillno != value); _maxbillno = value; }
		} 
	  
		/// <summary>
		/// 最大日期
		/// </summary>		
		public DateTime? Maxdate
		{
			get { return _maxdate; }
			set { _isChanged |= (_maxdate != value); _maxdate = value; }
		} 
		
		#endregion 
		
	}
}